﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DynaPrecision.LinearSystem
{
	public static class EMIBandArraySolver
	{
		public static TResult SolveFor<TResult, TData>(this IBandArraySolver solver, IMultiDimensionalArray<TData> input, IMultiDimensionalArray<TData> load, int halfBandWidth)
			where TResult : IInitializableArray<TData>, new()
		{
			TResult result = new TResult();
			result.Initiate(input.GetLength(1), 1);
			solver.SolveFor(input, load, result, halfBandWidth);
			return result;
		}
		public static TResult SolveFor<TResult, TData>(this IBandArraySolver solver, IBandArray<TData> input, IMultiDimensionalArray<TData> load)
			where TResult : IInitializableArray<TData>, new()
		{
			TResult result = new TResult();
			result.Initiate(input.GetLength(1), 1);
			solver.SolveFor(input, load, result, input.HalfBandWidth);
			return result;
		}
	}
}
